package v1

import (
	"time"
)

type RegisterRequest struct {
	Username string `json:"username" binding:"required"`
	Account  string `json:"Account" binding:"required"`
	Password string `json:"password" binding:"required"`
}

type LoginRequest struct {
	Account  string `json:"account" binding:"required" example:"hertz"`
	Password string `json:"password" binding:"required" example:"123456"`
}

type LoginResponse struct {
	Record GetUserProfileResponse `json:"record"`
	Token  string                 `json:"token"`
}

type AddUserRequest struct {
	Account  string `json:"account"`
	Password string `json:"password"`
	Username string `json:"username"`
}

type DeleteUserRequest struct {
	UserId int64 `uri:"userId" binding:"required"`
}

type DeleteUserResponse struct {
	UserId int64 `json:"userId" example:"1"`
}

type UpdateUserRequest struct {
	UserId   int64  `json:"userId" binding:"required" example:"1"`
	Password string `json:"password"`
	Username string `json:"username"`
	Status   int8   `json:"status"`
	Describe string `json:"describe"`
}

type GetUserProfileRequest struct {
	Account string `uri:"account" binding:"required"`
}

type GetUserProfileResponse struct {
	UserId     int64     `json:"userId"`
	Account    string    `json:"account"`
	Username   string    `json:"username"`
	Describe   string    `json:"describe"`
	AvatarPath string    `json:"avatarPath"`
	UserType   int8      `json:"userType"`
	Status     int8      `json:"status"`
	CreatedAt  time.Time `json:"createdAt"`
	UpdatedAt  time.Time `json:"updatedAt"`
}

type GetAllUserRequest struct {
	Page     int `form:"page" binding:"required"`
	PageSize int `form:"pageSize" binding:"required"`
}

type GetUserResponseData struct {
	UserId    int64       `json:"userId"`
	Account   string      `json:"account"`
	Username  string      `json:"username"`
	Describe  string      `json:"describe"`
	Status    int8        `json:"status"`
	CreatedAt time.Time   `json:"createdAt"`
	UpdatedAt time.Time   `json:"updatedAt"`
	DeletedAt interface{} `json:"deletedAt"`
}

type GetAllUserResponse struct {
	Total  int64                 `json:"total"`
	Record []GetUserResponseData `json:"record"`
}

type UpdateUserProfileReq struct {
	UserId   int64  `json:"userId" binding:"required" example:"1"`
	Username string `json:"username"`
	Describe string `json:"describe"`
}

type UpdateUserProfileResp struct {
	Username string `json:"username"`
	Describe string `json:"describe"`
}
